const releaseList = [
  {
    id: 1,
    platform: 'android',
    version: '1.0.0',
    description: '',
    env: 'qa',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 2,
    platform: 'android',
    version: '1.0.1',
    description: '',
    env: 'dev',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 3,
    platform: 'android',
    version: '1.0.2',
    description: '',
    env: 'qa',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 4,
    platform: 'android',
    version: '1.0.3',
    description: '',
    env: 'uat',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 5,
    platform: 'ios',
    version: '1.0.4',
    description: '',
    env: 'dev',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 6,
    platform: 'ios',
    version: '1.0.5',
    description: '',
    env: 'prod',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 7,
    platform: 'ios',
    version: '1.0.6',
    description: '',
    env: 'prod',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 8,
    platform: 'ios',
    version: '1.0.7',
    description: '',
    env: 'qa',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 9,
    platform: 'ios',
    version: '1.0.8',
    description: '',
    env: 'prod',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 10,
    platform: 'ios',
    version: '1.0.9',
    description: '',
    env: 'dev',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
  {
    id: 11,
    platform: 'ios',
    version: '1.0.10',
    description: '',
    env: 'uat',
    createTime: '2023-03-01 12:00:00',
    updateTime: '2023-03-01 12:00:00',
    releaseTime: '2023-03-01 12:00:00',
  },
];

export default {
  'POST /api/v1/release/page': (req: any, res: any) => {
    const { pageNum, pageSize } = req.body;
    const list = releaseList.slice(
      (pageNum - 1) * pageSize,
      pageNum * pageSize,
    );
    res.json({
      success: true,
      data: { list: list, total: releaseList.length },
      code: 200,
    });
  },
};
